package top.system.dept.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;

/**
 * @author: Amosen
 * @time: 2021-5-16
 */

public class User implements Serializable {

	private static final long serialVersionUID = 5573190581976511562L;

	private Integer id;

	private String account;

	@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
	private String password;

	private int auth;

	private String description;

	// 用户在微信客户端的唯一标识
	@JsonIgnore
	private String openid;

	private Dept dept;

	@JsonIgnore
	private String mail;


	public User() {
	}

	public User(Integer id, String account, String password, int auth, String description, String openid, Dept dept, String mail) {
		this.id = id;
		this.account = account;
		this.password = password;
		this.auth = auth;
		this.description = description;
		this.openid = openid;
		this.dept = dept;
		this.mail = mail;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getAuth() {
		return auth;
	}

	public void setAuth(int auth) {
		this.auth = auth;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public Dept getDept() {
		return dept;
	}

	public void setDept(Dept dept) {
		this.dept = dept;
	}

	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	@Override
	public String toString() {
		return "User{" +
				"id=" + id +
				", account='" + account + '\'' +
				", password='" + password + '\'' +
				", auth=" + auth +
				", description='" + description + '\'' +
				", openid='" + openid + '\'' +
				", dept=" + dept +
				", mail='" + mail + '\'' +
				'}';
	}
}
